Import Queries

In addition to defining Queries through the platform's user interface, you can import a file containing one or more Queries.

When importing Queries, the import file should be either comma-delimited or semicolon-delimited, and must include the following columns:

  • name (required): The Internal Name of the Query.

  • label (required): The Display Name of the Query.

  • execution_type (required): The Execution Type of the Query. Valid values are hive, sql, spark, and trino.

To import a file of Queries:

  1. Select Analytics from the top navigation bar, then select Settings > Queries from the side navigation menu. The Analytics Queries screen is displayed.

  1. From the Actions drop-down menu, select Import Bigdata Queries. The Create New Import pop-up window is displayed.

  1. Enter or select the desired configuration options. The different sections available within this window are described below in detail.

  2. When finished, click Submit to execute the import process.

File Options

This section defines the basic properties of the import file.

  1. From the Import Method drop-down menu, define how you want the platform to handle the import records:

    • Insert Data or Update if Duplicate: The platform will create new records and update existing records.

    • Insert Data or Skip if Duplicate: The platform will create new records only; updates to existing records are ignored.

    • Update Data or Skip Insert: The platform will update existing records only; new records are ignored.

  1. The Find Options field is automatically populated with the required columns for this import type. Optionally, depending on the type of object being imported, you may be able to select additional columns on your import file. Add these additional columns in the order in which they appear in your file.

  2. Optionally, to import blank values, select Yes next to Include Include Blank Values.

  3. The platform supports email and phone number syntax validation on the appropriate import fields. Optionally, to run this validation, select Yes next to Validate Records.

  4. If you have Business Units enabled in your account, select a Business Unit from the Business Unit drop-down menu.

  5. To send email notifications following a successful import process, enter one or more email addresses in the Success Import Email Recipients field.

  6. To send email notifications following a failed import process, enter one or more email addresses in the Failed Import Email Recipients field.

  7. To select the import file, click Choose File. Browse to and select the desired file, then click Open.

  8. Select the column separator used in the import file: Comma or Semicolon.

Import Options

This section provides additional options regarding the use of Lookup tables in the import process:

  1. Click Add Options.

  2. To use a Lookup table, select the desired table from the Lookup Table drop-down menu.

  3. From the Lookup Column drop-down menu, select the desired column on the Lookup table.

  4. Enter a value in the Rename as field.

  5. In the Find by Columns field, select one or more columns used to identify existing records in the database.

  6. If the Lookup table is required, select Yes next to Required.

  7. If you want to stop the import process if a duplicate record is found, select Yes next to Abort on Duplicate Record.

  8. Optionally enter any additional conditions as Groovy expressions in the Condition field.

  9. Optionally, click Delete to remove the additional import options.